package com.mc.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.mc.model.newsandbulletin;

public interface newsandbulletinMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(newsandbulletin record);

    int insertSelective(newsandbulletin record);

    newsandbulletin selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(newsandbulletin record);

    int updateByPrimaryKeyWithBLOBs(newsandbulletin record);

    int updateByPrimaryKey(newsandbulletin record);
    
    void insertNorB(newsandbulletin record);
    
    
    
    List<newsandbulletin> selectAllNews();
    
    List<newsandbulletin> selectAllBulletin();
    
    int selectAllNewsCount();
    
    int selectAllBulletinCount();
    
    void updateNorB(newsandbulletin nb);
    
    List<newsandbulletin> selectpNews(@Param("start")int start,@Param("size")int size);
    
    int selectpNewsCount();
    
    List<newsandbulletin> selectpBulletin(@Param("start")int start,@Param("size")int size);
    
    int selectpBuletinCount();
    //首页公告
    List<newsandbulletin> selecttopXb(int size);
    //首页新闻
    List<newsandbulletin> selectindexnews();
    //党建之窗的新闻
    List<newsandbulletin> selectdjzcnews();
    
    //学生的新闻
    List<newsandbulletin> selectstudentnews();
    
    //学生的公告
    List<newsandbulletin> selectstudentbulletins();
    
    //招生就业的新闻
    List<newsandbulletin> selectzsjynews();
    
    List<newsandbulletin> selectTopFiveNews();
    
    List<newsandbulletin> selectTopFilvezsjynews();
    
    void clickNews(int id);
    
    List<newsandbulletin> selectHotNB(String type);
    
    int countoftopb();
    
    void settopnbbytype(@Param("type")String type,@Param("id")int id);
    
    void canceltopnbbytype(@Param("type")String type,@Param("id")int id);
    
    List<newsandbulletin> selecttopn();
    
    List<newsandbulletin> selectdjNews(@Param("start")int start,@Param("size")int size);
    
    int countofdjnews();
    
	List<newsandbulletin> selectzsjyNews(@Param("start")int start,@Param("size")int size);
	    
	int countofzsjynews();
	    
	List<newsandbulletin> selectxsgzNews(@Param("start")int start,@Param("size")int size);
	    
	int countofxsgznews();
	    
	List<newsandbulletin> selectdjb(@Param("start")int start,@Param("size")int size);
	    
	int countofdjb();
	    
	List<newsandbulletin> selectzsjyb(@Param("start")int start,@Param("size")int size);
	    
	int countofzsjyb();
	List<newsandbulletin> selectxsgzb(@Param("start")int start,@Param("size")int size);
	    
	int countofxsb();
	List<newsandbulletin> selectxsb(@Param("start")int start,@Param("size")int size);
	int countofxsgzb();
	List<newsandbulletin> selectkynews(@Param("start")int start,@Param("size")int size);
    
	int countofkynews();
	
	void setimportantnews(int id);
	
	void cancelimportantnews(int id);
	int countoftopn();
	int countofimportantnews();
	
	List<newsandbulletin> selectallimportantnews();
	List<newsandbulletin> selectnbbytype(@Param("nbtype")String nbtype,@Param("type")int type,
			@Param("start")int start,@Param("size")int size);
	int countofnb(@Param("nbtype")String nbtype,@Param("type")int type);
	
	List<newsandbulletin> newsbytype(int type);
	
	List<newsandbulletin> searchnbs(@Param("title")String title,@Param("type")String type,
			@Param("start") int start,@Param("size")int size);
	
	int countofresults(@Param("title")String title,@Param("type")String type);
 }